﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Adm.Master" Theme="Adm" AutoEventWireup="true" CodeBehind="ConsultaListaEsf.aspx.cs" Inherits="PROAD.admin.Consulta.ConsultaListaEsf" %>
<asp:Content ID="Content1" ContentPlaceHolderID="IncludeHead" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="IncludeTitulo" runat="server">
<h1>Lista de Equipes de Saúde</h1>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="IncludeLink" runat="server">
<h1><a href="/admin/Forms/FormEsf.aspx">Nova ES</a></h1>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="IncludeConteudo" runat="server">
         
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
         
         <table width="100%">
                    <tr>
                        <td>Nome da ES</td>
                        <td>Área</td>
                        <td>US</td>
                        <td>UF</td>
                        <td>&nbsp;</td>
                    </tr>
                     <tr>
                        <td><asp:TextBox ID="txtNomeEs" runat="server" Width="150px"></asp:TextBox></td>
                        <td><asp:TextBox ID="txtArea" runat="server" Width="106px"></asp:TextBox></td>
                        <td><asp:TextBox ID="txtUs" runat="server" Width="179px"></asp:TextBox></td>
                        <td><asp:DropDownList ID="ddlUf" runat="server" Width="130px" DataValueField="CO_UF" DataTextField="NO_SIGLA">
                         </asp:DropDownList></td>
                        <td><asp:Button ID="btnPesquisar" runat="server" Text="Pesquisar ESF" Width="130px" 
                                onclick="btnPesquisar_Click"/></td>
                     </tr>
                     <tr>
                        <td colspan="5"> &nbsp;</td>
                    </tr>
                     <tr>
                        <td colspan="5"> 
                        <%--Grid com resultados--%>
                          <asp:GridView ID="gridEs" runat="server" CellPadding="4" ForeColor="#333333" 
                              GridLines="None" SkinID="GridAdm" AutoGenerateColumns="false" 
                              EmptyDataText="<center>Não foram encontrados registros!</center>" 
                                onrowcommand="gridEs_RowCommand">
                      
                              <Columns>
                                <asp:TemplateField HeaderText="">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="lnkStatus" runat="server" CommandName="Status"
                                            CommandArgument='<%#Eval("CO_ES")%>' Visible="True">
                                            <img alt="Status" border="0" src="../../common/imagem_sis/imagem_sis/<%#Eval("NR_STATUS").ToString() == "0" ? "inativo.png" : "ativo.png"%>" />
                                        </asp:LinkButton>
                                    </ItemTemplate>
                                    <HeaderStyle Font-Size="13px" Width="40px" Font-Names="Verdana"/>
                                    <ItemStyle Font-Size="10pt" HorizontalAlign="Center" />
                                </asp:TemplateField> 
                
                                <asp:BoundField DataField="NO_ES" HeaderText="Nome ES">
                                    <HeaderStyle Font-Size="13px" Font-Names="Verdana" HorizontalAlign="Left"/>
                                    <ItemStyle Font-Size="10pt" HorizontalAlign="Left" />
                                </asp:BoundField>

                                <asp:BoundField DataField="DS_AREA" HeaderText="Área">
                                    <HeaderStyle Font-Size="13px" Font-Names="Verdana" HorizontalAlign="Left"/>
                                    <ItemStyle Font-Size="10pt" HorizontalAlign="Left" />
                                </asp:BoundField>
                        
                                <asp:BoundField DataField="NO_US" HeaderText="Nome US">
                                    <HeaderStyle Font-Size="13px" Font-Names="Verdana" HorizontalAlign="Left"/>
                                    <ItemStyle Font-Size="10pt" HorizontalAlign="Left" />
                                </asp:BoundField>

                                <asp:BoundField DataField="NO_SIGLA" HeaderText="UF">
                                    <HeaderStyle Font-Size="13px" Font-Names="Verdana" HorizontalAlign="Left"/>
                                    <ItemStyle Font-Size="10pt" HorizontalAlign="Left" />
                                </asp:BoundField>

                                <asp:TemplateField HeaderText="">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="lnkEditar" runat="server" CommandName="Editar"
                                            CommandArgument='<%#Eval("CO_ES")%>' Visible="True">
                                            <img alt="Status" border="0" src="../../common/imagem_sis/imagem_sis/editar.png" />
                                        </asp:LinkButton>
                                    </ItemTemplate>
                                    <HeaderStyle Font-Size="13px" Width="40px" Font-Names="Verdana"/>
                                    <ItemStyle Font-Size="10pt" HorizontalAlign="Center" />
                                </asp:TemplateField>
                                              
                              </Columns>
                                            
                          </asp:GridView>
                         </td>
                     </tr>                   
                </table>

        </ContentTemplate>
    </asp:UpdatePanel>
    
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="IncludeRodape" runat="server">
</asp:Content>
